package operation.user;

import uesr.User;

import java.util.Scanner;

public class Login implements User_Operation{

    @Override
    public void work(User user) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("欢迎你,亲爱的用户");
        System.out.println("请输入账号");
        int account = scanner.nextInt();
        System.out.println("请输入密码");
        int password = scanner.nextInt();
        if (user == null) {
            System.out.println("用户不存在或账号密码输入错误");
        }

        if (user.account == account && password == user.password) {
            System.out.println("登录成功");
        }

    }
}
